
<html><HEAD>
<LINK REL=STYLESHEET HREF="default.css" TYPE="text/css">
<TITLE>
Accessing data properties</TITLE>
</HEAD>
<BODY>

<!-- Header -->
<p class="ancestor" align="right"><A HREF="apptechp92.htm">Previous</A>&nbsp;&nbsp;<A HREF="apptechp94.htm" >Next</A>
<!-- End Header -->
<A NAME="X-REF377543569"></A><h1>Accessing data properties</h1>
<A NAME="TI2483"></A><p>To access properties related to a graph's data during
execution, you use PowerScript graph functions. The graph functions related
to data fall into several categories:<A NAME="TI2484"></A>
<ul>
<li class=fi>Functions that provide information about a graph's
data</li>
<li class=ds>Functions that save data from a graph</li>
<li class=ds>Functions that change the color, fill patterns,
and other visual properties of data
</li>
</ul>
</p>
<A NAME="TI2485"></A><h4>How to use the functions</h4>
<A NAME="TI2486"></A><p>To call functions for a graph in a graph control, use the
following syntax:<p><PRE><i>graphControlName.FunctionName</i> ( <i>Arguments</i> )</PRE></p>
</p>
<A NAME="TI2487"></A><p>For example, to get a count of the categories in the window
graph <b>gr_printer</b>, code:<p><PRE> Ccount = gr_printer.CategoryCount()</PRE></p>
<p><img src="images/note.gif" width=17 height=17 border=0 align="bottom" alt="Note"> <span class=shaded>Different syntax for graphs in DataWindows</span> <A NAME="TI2488"></A>The syntax for the same functions is more complex when the
graph is in a DataWindow, like this:<p><PRE><i>DataWindowName.FunctionName</i> ( "<i>graphName</i>", <i>otherArguments...</i> )</PRE></p>
</p>
<A NAME="TI2489"></A>For more information, see the <i>DataWindow Programmers
Guide</i>
.</p>
<A NAME="TI2490"></A><h2>Getting information about the data</h2>
<A NAME="TI2491"></A><p>The PowerScript functions in <A HREF="apptechp93.htm#CEGDFBCJ">Table 15-3</A> allow you to get information about data
in a graph at runtime.</p>
<A NAME="CEGDFBCJ"></A><table cellspacing=0 cellpadding=6 border=1 frame="void" rules="all"><caption>Table 15-3: PowerScript functions for information
at runtime</caption>
<tr><th  rowspan="1"  ><A NAME="TI2492"></A>Function</th>
<th  rowspan="1"  ><A NAME="TI2493"></A>Information provided</th>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI2494"></A><b>CategoryCount</b></td>
<td  rowspan="1"  ><A NAME="TI2495"></A>The number of categories in a graph</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI2496"></A><b>CategoryName</b></td>
<td  rowspan="1"  ><A NAME="TI2497"></A>The name of a category, given its number</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI2498"></A><b>DataCount</b></td>
<td  rowspan="1"  ><A NAME="TI2499"></A>The number of data points in a series</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI2500"></A><b>FindCategory</b></td>
<td  rowspan="1"  ><A NAME="TI2501"></A>The number of a category, given its name</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI2502"></A><b>FindSeries</b></td>
<td  rowspan="1"  ><A NAME="TI2503"></A>The number of a series, given its name</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI2504"></A><b>GetData</b></td>
<td  rowspan="1"  ><A NAME="TI2505"></A>The value of a data point, given its
series and position (superseded by <b>GetDataValue</b>,
which is more flexible)</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI2506"></A><b>GetDataLabelling</b></td>
<td  rowspan="1"  ><A NAME="TI2507"></A>Indicates whether the data at a given
data point is labeled in a DirectX 3D graph</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI2508"></A><b>GetDataieExplode</b></td>
<td  rowspan="1"  ><A NAME="TI2509"></A>The percentage by which a pie slice is
exploded</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI2510"></A><b>GetDataStyle</b></td>
<td  rowspan="1"  ><A NAME="TI2511"></A>The color, fill pattern, or other visual
property of a specified data point</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI2512"></A><b>GetDataTransparency</b></td>
<td  rowspan="1"  ><A NAME="TI2513"></A>Indicates the transparency value of a
given data point in a DirectX 3D graph</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI2514"></A><b>GetDataValue</b></td>
<td  rowspan="1"  ><A NAME="TI2515"></A>The value of a data point, given its
series and position</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI2516"></A><b>GetSeriesLabelling</b></td>
<td  rowspan="1"  ><A NAME="TI2517"></A>Indicates whether a data series has a
label in a DirectX 3D graph</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI2518"></A><b>GetSeriesStyle</b></td>
<td  rowspan="1"  ><A NAME="TI2519"></A>The color, fill pattern, or other visual
property of a specified series</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI2520"></A><b>GetSeriesTransparency</b></td>
<td  rowspan="1"  ><A NAME="TI2521"></A>Indicates the transparency value of a
data series in a DirectX 3D graph</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI2522"></A><b>ObjectAtPointer</b></td>
<td  rowspan="1"  ><A NAME="TI2523"></A>The graph element over which the mouse
was positioned when it was clicked</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI2524"></A><b>SeriesCount</b></td>
<td  rowspan="1"  ><A NAME="TI2525"></A>The number of series in a graph</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI2526"></A><b>SeriesName</b></td>
<td  rowspan="1"  ><A NAME="TI2527"></A>The name of a series, given its number</td>
</tr>
</table>
<A NAME="TI2528"></A><h2>Saving graph data</h2>
<A NAME="TI2529"></A><p>The PowerScript functions in <A HREF="apptechp93.htm#CEGCHEBB">Table 15-4</A> allow you to save data from the graph.</p>
<A NAME="CEGCHEBB"></A><table cellspacing=0 cellpadding=6 border=1 frame="void" rules="all"><caption>Table 15-4: PowerScript functions for saving
graph data</caption>
<tr><th  rowspan="1"  ><A NAME="TI2530"></A>Function</th>
<th  rowspan="1"  ><A NAME="TI2531"></A>Action</th>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI2532"></A><b>Clipboard</b></td>
<td  rowspan="1"  ><A NAME="TI2533"></A>Copies a bitmap image of the specified
graph to the clipboard</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI2534"></A><b>SaveAs</b></td>
<td  rowspan="1"  ><A NAME="TI2535"></A>Saves the data in the underlying graph
to the clipboard or to a file in one of a number of formats</td>
</tr>
</table>
<A NAME="TI2536"></A><h2>Modifying colors, fill patterns, and other data</h2>
<A NAME="TI2537"></A><p>The PowerScript functions in <A HREF="apptechp93.htm#CEGDCFBG">Table 15-5</A> allow you to modify the appearance of
data in a graph.</p>
<A NAME="CEGDCFBG"></A><table cellspacing=0 cellpadding=6 border=1 frame="void" rules="all"><caption>Table 15-5: PowerScript functions for changing
appearance of data</caption>
<tr><th  rowspan="1"  ><A NAME="TI2538"></A>Function</th>
<th  rowspan="1"  ><A NAME="TI2539"></A>Action</th>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI2540"></A><b>ResetDataColors</b></td>
<td  rowspan="1"  ><A NAME="TI2541"></A>Resets the color for a specific data
point</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI2542"></A><b>SetDataLabelling</b></td>
<td  rowspan="1"  ><A NAME="TI2543"></A>Sets the label for a data point in a
DirectX 3D graph</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI2544"></A><b>SetDataPieExplode</b></td>
<td  rowspan="1"  ><A NAME="TI2545"></A>Explodes a slice in a pie graph</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI2546"></A><b>SetDataStyle</b></td>
<td  rowspan="1"  ><A NAME="TI2547"></A>Sets the color, fill pattern, or other
visual property for a specific data point</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI2548"></A><b>SetDataTransparency</b></td>
<td  rowspan="1"  ><A NAME="TI2549"></A>Sets the transparency value for a data
point in a DirectX 3D graph</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI2550"></A><b>SetSeriesLabelling</b></td>
<td  rowspan="1"  ><A NAME="TI2551"></A>Sets the label for a series in a DirectX
3D graph</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI2552"></A><b>SetSeriesStyle</b></td>
<td  rowspan="1"  ><A NAME="TI2553"></A>Sets the color, fill pattern, or other
visual property for a series</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI2554"></A><b>SetSeriesTransparency</b></td>
<td  rowspan="1"  ><A NAME="TI2555"></A>Sets the transparency value for a series
in a DirectX 3D graph</td>
</tr>
</table>

